class window.LooseScreen extends Screen
    setLast : (@lastScreen) ->
        @font = @lastScreen.font
        @cooldown = 100

        @tip = Math.random() * 3.9 | 0

    update : () ->
        @cooldown -= 1
        if window.Input.any.isDown() and @cooldown < 0
            @screenGoBack()
    
    render : () ->
      @font.setColor 1.0, 0.0, 0.0, 1.0
      @font.drawString -250, -60, "You are dead...", 4.0
      @font.drawString -380, -25, "Press any key to restart", 4.0
      @font.setColor 1.0, 1.0, 0.0, 1.0

      @font.drawString -250, 10, "(Visible bodies alert guards!)", 2.0 if @tip == 0
      @font.drawString -350, 10, "(Breaking flasks and plates attract guards)", 2.0 if @tip == 1
      @font.drawString -350, 10, "(Break line of sight, the AI gives up fast)", 2.0 if @tip == 2
      @font.drawString -310, 10, "(In a pinch, a corpse make fine weapon)", 2.0 if @tip == 3
       